﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;


namespace Animation
{
    [ContentTypeWriter]
    public class AnimationStateContentWriter : ContentTypeWriter<AnimationState>
    {
        protected override void Write(ContentWriter output, AnimationState value)
        {
            output.Write(value.StateName);
            output.Write(value.FrameCount);
            output.Write(value.RepeatCount);
            output.WriteObject<List<string>>(value.TextureNames);
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            // TODO: change this to the name of your ContentTypeReader
            // class which will be used to load this data.
            return typeof(AnimationStateContentReader).AssemblyQualifiedName;
        }
    }
}
